package com.glls.sbmybatis.cityMapper;


import com.glls.sbmybatis.entity.City;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
    //计算机科学与技术4班胡涵玉
@Mapper
public interface CityMapper {


    //根据id查询
    @Select("select * from city where id=#{id}")
    public City findbyId(int id);

    //查询所有数据
    @Select("select * from city")
    public List<City> findAll();

    //根据id修改
    @Update("update city set name=#{name},regionName=#{regionName},population=#{population} where id=#{id}")
    int update(CityMapper cityMapper);



}